package com.decent.core.alarm.params;

import com.decent.common.enums.alarm.AlarmTypeEnum;
import com.decent.core.alarm.annotation.AlarmTemplateField;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 订单异常报警参数
 *
 * @author 王雪杰
 * @date 2022/3/22
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AbnormalOrderParams implements AlarmParams, Serializable {
    private static final long serialVersionUID = 294033694601425014L;
    /**
     * 变量日期
     */
    @NotBlank(message = "报警日期不能为空", groups = Send.class)
    @AlarmTemplateField("（变量日期）")
    private String date;
    /**
     * 变量门店
     */
    @NotBlank(message = "报警门店不能为空", groups = Send.class)
    @AlarmTemplateField("（变量门店）")
    private String storeName;
    /**
     * 变量商品
     */
    @NotBlank(message = "报警商品不能为空", groups = Send.class)
    @AlarmTemplateField("（变量商品）")
    private String productName;

    /**
     * 发送消息类型,公司唯一
     *
     * @return 发送类型
     */
    @Override
    public AlarmTypeEnum sendType() {
        return AlarmTypeEnum.ABNORMAL_ORDER;
    }


}
